Skip to content

Contrib - Improving NAT/PAT Bypass + DSCP on Control Session#100

Open
froudaut wants to merge 5 commits intoperfsonar:masterfrom
froudaut:contrib
Open

Contrib - Improving NAT/PAT Bypass + DSCP on Control Session#100
froudaut wants to merge 5 commits intoperfsonar:masterfrom
froudaut:contrib

Conversation

@froudaut
Copy link

@froudaut froudaut commented Dec 2, 2024

Trying to provide solutions to improve NAT/PAT Bypass :

TWAMP, twping :

  • option [Z] was already implemented to set Session Sender/Reflector IP to Zero Addr in Twamp
    Requests from Control-Client. In that case, Control-Client is also Session-Sender and
    Control-Server is Session-Reflector. Control-Server had then to switch the Zero Addr with
    the corresponding Control IP Addr.
    Such option is still available but now also split in 2 options : [X] For Session-Sender,
    [Y] For Session-Reflector.
    It helps to bypass NAT on both Session Sender/Reflector when they are also Control Client/Server.
  • Option [y] to handle PAT from the Session-Reflector. In that case, Session-Reflector Port
    is not checked.

OWAMP, owping :

  • Option [X], [Y] has been added as an extension to OWAMP RFC when Session Sender/Receiver are
    also Control Client/Server.
    As for TWAMP, it permits to set Session Sender/Receiver IP to Zero Addr in Owamp Requests
    from Control-Client : [X] For Session-Sender, [Y] For Session-Server.
    In that case Control-Server had to switch the Zero Addr with the corresponding Session IP Addr
    according the way test is done. For example when tests are done in both ways using Owamp, option [X]
    tells the Control-Server to use the zero address for Control-Client in test session from Control-Client
    to Control-Server and for Control-Server in test session from Control-Server to Control-client
    It helps to bypass NAT on both Session Sender/Receiver.
  • Option [y] to handle PAT from the Session-Remote. In that case, Session-Remote Port
    is not checked.

twampd :

  • Option [W] : has to be used now to handle Zero Addr in Twamp Request when Session Sender/Reflector
    are also Control Client/Server. Control-Server had then to switch the Zero Addr with
    the corresponding Control IP Addr.
    It helps to bypass NAT on both Session Sender/Reflector when they are also Control Client/Server.
  • Option [x] to handle PAT from the Session-Sender. In that case, Session-Sender Port
    is not checked. Indeed, even with Zero Address, PAT on Session-Sender was not considered.
  • Option [Y] : Such option may be used if Control-Client is not aware of NAT on Session-Reflector Side and/or
    does not use zero address. In that case any Session-Reflector Address is seen as Local Address.

owampd :

  • Option [W] has been added as an extension to OWAMP RFC when Session Sender/Receiver are
    also Control Client/Server.
    As for TWAMP, it permits to handle Zero Addr for Session Sender/Receiver in Owamp Requests
    from Control-Client
    In that case Control-Server had to switch the Zero Addr with the corresponding Session IP Addr
    according the way test is done.
    It helps to bypass NAT on both Session Sender/Receiver.
  • Option [x] to handle PAT from the Session-Remote. In that case, Session-Remote Port
    is not checked. Indeed, even with Zero Address, PAT on Session-Remote was not considered.
  • Option [Y] : Such option may be used if Control-Client is not aware of NAT on Session-Local Side and/or
    does not use zero address. In that case any Session-Local Address is seen as Local Address.

DSCP On Control Session:

owping/twping

Add an option [m] to set DSCP field on Control packets (from Control Client to Server).
To reflect ToS received from Control-Client, on Linux we may have to set 1 into
/proc/sys/net/ipv4/tcp_reflect_tos on Control-Server side

	modifié :         owamp/owamp/configure.ac
	modifié :         owamp/owamp/owamp/api.c
	modifié :         owamp/owamp/owamp/capi.c
	modifié :         owamp/owamp/owamp/endpoint.c
	modifié :         owamp/owamp/owamp/owamp.h
	modifié :         owamp/owamp/owamp/owampP.h
	modifié :         owamp/owamp/owamp/protocol.c
	modifié :         owamp/owamp/owamp/sapi.c
	modifié :         owamp/owamp/owampd/owampd.c
	modifié :         owamp/owamp/owampd/owampdP.h
	modifié :         owamp/owamp/owping/owping.c
	modifié :         owamp/owamp/owping/owpingP.h
	modifié :         owamp/owamp/powstream/powstream.c
	modifié :         owamp/owamp/powstream/powstreamP.h
	modifié :         owamp/owamp/test/session_setup.c
@mfeit-internet2
Copy link
Member

Thanks for your contribution. We're currently in the middle of our conference and holiday season and will have a look at your proposed changes early next year.

Not having reviewed the changes yet, a couple of general comments: This software is considered the reference implementation for OWAMP, so we have to tread carefully. Our primary concerns will be not breaking existing behavior, interoperability with versions of the software that don't have this patch and changes to the protocol which, unfortunately, doesn't have provisions for versioning.

@froudaut
Copy link
Author

froudaut commented Dec 29, 2024

Hi .
for sure. In fact I use a similar patch from 2017, even before you add -Z option to bypass NAT.
I used this against various implementation: Cisco, Juniper, ..., without some issues.
I decided to get your recent fixes in the last months and I had then to reapply my own patch . This is why I now do this push request; to avoid to do this again later ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants